NDepend.API Documentation
Union<T>(HashSet<T>,HashSet<T>) Method
NDepend.Helpers Namespace > ExtensionMethodsSet Class > Union Method : Union<T>(HashSet<T>,HashSet<T>) Method
The code element type of the elements of the hashset and the sequence.
A sequence of elements whose distinct elements form the first set for the union.
An hashset of elements whose distinct elements form the second set for the union.
Produces the set of elements, union of this thisHashset and otherHashset. This method is an optimized version of Enumerable.Union<T>.
Syntax

Parameters

thisHashset
A sequence of elements whose distinct elements form the first set for the union.
otherHashset
An hashset of elements whose distinct elements form the second set for the union.

Type Parameters

T
The code element type of the elements of the hashset and the sequence.

Return Value

A sequence that contains the elements that form the set union of both hashsets, excluding duplicates.
Remarks
This extension method has a O(otherHashset.Count) time complexity.
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

ExtensionMethodsSet Class
ExtensionMethodsSet Members
Overload List